//
//  MonitorModel.m
//  CityFire
//
//  Created by Liuyz on 2017/8/16.
//  Copyright © 2017年 刘养柱. All rights reserved.
//

#import "MonitorModel.h"

@implementation MonitorModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey
{
    return @{
             @"tableName" : @"table_name",
             @"num" : @"num",
             @"deviceCode" : @"device_code",
             @"deviceCode1" : @"deviceCode",

             @"timeHistory" : @"time_history",
             @"record1" : @"record1",
             @"record2" : @"record2",
             @"record3" : @"record3",
             @"misinformation" : @"misinformation",
             @"deviceName" : @"device_name",
             @"deviceName1" : @"deviceName",
             @"deviceType" : @"device_type",
             @"deviceType1" : @"deviceType",
             @"deviceAddress" : @"device_address",
             @"deviceAddress1" : @"deviceAddress",
             @"longitude" : @"longitude",
             @"latitude" : @"latitude",
             @"linkMan" : @"link_man",
             @"linkMan1" : @"linkMan",
             @"phone" : @"phone",
             @"detectorAmount" : @"detector_amount",
             @"detectorAmount1" : @"detectorAmount",
             @"controllerManufacturer" : @"controller_manufacturer",
             @"controllerManufacturer1" : @"controllerManufacturer",
             @"controllerSpec" : @"controller_spec",
             @"controllerSpec1" : @"controllerSpec",

             @"itemCode" : @"item_code",
             @"itemCode1" : @"itemCode",
             @"purchaseTime" : @"purchase_time",
             @"purchaseTime1" : @"purchaseTime",
             @"wbnx" : @"wbnx",
             @"cjInterval" : @"cjInterval",
             @"deviceOrg" : @"deviceOrg",
             @"hotline" : @"hotline",
             @"lastTime" : @"lastTime",
             @"recordUsrLog" : @"record_usr_log",
             @"remark" : @"remark",
             @"status1" : @"status"
             };
}
//
//cjInterval = "<null>";
//controllerManufacturer = 0;
//controllerSpec = 0;
//detectorAmount = 0;
//deviceAddress = "\U65f6\U4ee3\U5e7f\U573a";
//deviceCode = 100002;
//deviceName = "HJ\U706b\U707e\U62a5\U8b66\U5668";
//deviceOrg = "\U65f6\U4ee3\U5e7f\U573a";
//deviceType = "\U706b\U707e\U76d1\U63a7\U8bbe\U5907";
//hotline = 0;
//itemCode = 100002;
//lastTime = "<null>";
//latitude = 111;
//linkMan = "\U8d75";
//longitude = 222;
//num = 34;
//phone = 13756561326;
//purchaseTime = "";
//remark = "\U6682\U672a\U8865\U51453";
//status = 05;
//wbnx = 15;


//- (NSString *)deviceName
//{
//    return [NSString stringWithFormat:@"设备名称:%@", _deviceName];
//}
//
//
//- (NSString *)record2
//{
//    return [NSString stringWithFormat:@"类型:%@", _record2];
//}
//
//- (NSString *)deviceType
//{
//    return [NSString stringWithFormat:@"设备类型:%@", _deviceType];
//}
//
//- (NSString *)purchaseTime
//{
//    return [NSString stringWithFormat:@"时间:%@", _purchaseTime];
//}
//
- (NSString *)misinformation
{
    return [NSString stringWithFormat:@"误报:%@", [_misinformation isEqualToString:@"1" ] ? @"是" : @"否"];
}

- (NSString *)recordUsrLog
{
    return [NSString stringWithFormat:@"处理结果:%@", _recordUsrLog];
}
//
//- (NSString *)deviceNameInfo
//{
//    return [NSString stringWithFormat:@"%@\n设备编号:%@\n时间:%@\n来源:%@\n类型:%@\n内容:%@", self.deviceName, self.num, self.timeHistory, self.record1, self.deviceType, self.record3];
//}
//
//- (NSString *)deviceTypeInfo
//{
//    return [NSString stringWithFormat:@"设备信息:%@\n设备类型:%@\n控制器厂家:%@\n%@\n控制器型号:%@\n设备编号:%@\n产品编号:%@\n探测器数量:%@\n采购时间:%@\n设备所在地:%@\n维保年限:%@\n维护联系人:%@\n联系人电话:%@", self.deviceName, self.deviceType, self.controllerManufacturer, self.deviceName, self.controllerSpec, self.num, self.itemCode, self.detectorAmount, self.purchaseTime, self.deviceAddress, self.wbnx, self.linkMan, self.phone];
//}
//
//- (NSString *)deviceAddress
//{
//    return [NSString stringWithFormat:@"经度:%@\n纬度:%@", self.latitude, self.longitude];
//}
//
//- (NSString *)contactInfo
//{
//    return [NSString stringWithFormat:@"姓名:%@ 联系电话:%@", self.linkMan, self.phone];
//}
//
//- (NSArray *)itemsArray
//{
//    return @[self.deviceNameInfo, self.deviceTypeInfo, self.deviceAddress];
//}



//- (NSString *)status
//{
//    return [NSString stringWithFormat:@"状态:%@", [self.status1 isEqualToString:@"01"] ? @"正常" : [self.status1 isEqualToString:@"02"]  ? @"故障" :[self.status1 isEqualToString:@"03"]  ? @"报警" :[self.status1 isEqualToString:@"04"]  ? @"异常" :[self.status1 isEqualToString:@"05"]  ? @"离线" : @""];
//}
//正常、故障、报警、异常、离线
//01,02,03,04,05

@end

@implementation MonitorCountModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey
{
    return @{
             @"waringSize" : @"waringSize"
             };
}

@end
